package suanfa.lianxi;


import java.util.HashMap;
import java.util.Map;

//4.如何对HashMap集合进行迭代访问。
public class Hashmap {
    public static void main(String[] args) {
        String[] b={"a","b","c","d","e"};
        Map<Integer,String> a=new HashMap<>();
        int i=0;
        for(String c:b){
            a.put(i++,c);

        }
        System.out.println(a);

    }
}
